package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the t_category database table.
 * 
 */
@Entity
@Table(name="t_category")
@NamedQuery(name="TCategory.findAll", query="SELECT t FROM TCategory t")
public class TCategory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id

	private String cid;

	private String cname;

	private String desc;

	private int orderBy;
	
	private int pid;
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	//bi-directional many-to-one association to TBook
	@OneToMany(mappedBy="TCategory")
	private List<TBook> TBooks;

	
	public TCategory() {
	}

	public String getCid() {
		return this.cid;
	}

	public void setCid(String cid) {
		this.cid = cid;
	}

	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	public String getDesc() {
		return this.desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getOrderBy() {
		return this.orderBy;
	}

	public void setOrderBy(int orderBy) {
		this.orderBy = orderBy;
	}

	public List<TBook> getTBooks() {
		return this.TBooks;
	}

	public void setTBooks(List<TBook> TBooks) {
		this.TBooks = TBooks;
	}

	


	
}